<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes" />
<script type="text/javascript" charset="UTF-8" src="http://www.w3cplus.com/demo/css3/prefixfree.min.js"></script>
<style type="text/css">
	/*基本样式*/
	
	body {
		background: url('http://www.w3cplus.com/demo/css3/minimal-login-ui/bg.jpg') no-repeat center fixed;
		background-size: 100% 100%;/*让背景图全屏显示，常用来制作全屏背景*/
	}
	header{
	color:white;
	margin:auto 50px;
	}
	.content {
		width: 600px;
		height: 420px;
		margin: 50px auto;
	}
	/*登录表单form样式*/
	.login-form {
	  width:400px;
	  height:177px;
	  margin:70px auto 0;
	  padding-top:73px;
	  position:relative;/*为用户头像定位做一个参照点*/
	  background-image:-*-linear-gradient(top,rgb(255,255,255),rgb(242,242,242));/*渐变效果制作*/
	  box-shadow:0 3px 3px rgba(21,62,78,0.8);/*阴影效果实现*/
	}
	/*使用伪类制作用户头像效果*/
	.login-form:before {
	  content:"";
	  position:absolute;
	  top:-50px;
	  left:150px;
	  width:102px;
	  height:102px;
	  padding:2px;
	  border:1px solid rgb(216,216,219);
	  background:#fff url("http://www.w3cplus.com/demo/css3/minimal-login-ui/profilepicture.jpg") no-repeat 2px 2px;/*加载用户头像*/
	}
	/*注册提示信息*/
	.not-registered {
	  position:absolute;
	  color:rgb(153,153,153);
	  font-weight:bold;
	  top:calc(100% + 20px);/*相当于bottom:-66px(div.not-registered自身的高度46px加上向下移动的20px)*/
	  background-color:rgb(255,255,255);
	  width:400px;
	  height:46px;
	  margin:0 auto;
	  line-height:46px;
	  text-align: center;
	  box-shadow:0 3px 3px rgba(21,62,78,0.8);
	}
	.not-registered a {
	  margin-left:5px;
	  text-decoration: none;
	  color:rgb(52,119,182);
	  cursor: pointer;
	}
	/*调用服务器字体*/
	@font-face {
	  font-family: 'loginform-icon';
	  src: url("http://www.w3cplus.com/demo/css3/minimal-login-ui/font/loginform-icon.eot");
	  src: url("http://www.w3cplus.com/demo/css3/minimal-login-ui/font/loginform-icon.eot?#iefix") format('embedded-opentype'),
	    url("http://www.w3cplus.com/demo/css3/minimal-login-ui/font/loginform-icon.woff") format('woff'),
	    url("http://www.w3cplus.com/demo/css3/minimal-login-ui/font/loginform-icon.ttf") format('truetype'),
	    url("http://www.w3cplus.com/demo/css3/minimal-login-ui/font/loginform-icon.svg#loginform-icon") format('svg');
	  font-weight: normal;
	  font-style: normal;
	}
	/*表单内部元素样式设置*/
	.login-form div {
	  width:216px;
	  height:28px;
	  margin:20px auto;
	  position:relative;
	  line-height:28px;
	  border:none;
	}
	/*用户和密码的icon制作*/
	.login-form .user-icon, 
	.login-form .password-icon {
	  display:inline-block;
	  font-family: 'loginform-icon';
	  font-size:15px;
	  text-align:center;
	  line-height:28px;
	  color:rgb(153,153,153);
	  position:absolute;
	  left:1px;
	  top:1px;
	  background-color:rgb(255,255,255);
	  border:none;
	  border-right:1px solid rgb(229,229,232);
	  width:30px;
	  height:28px;
	  transition: all 300ms linear;
	}
	/*表单input的样式*/
	.login-form .username input, .login-form .password input {
	  height:100%;
	  width:calc(100% - 40px);/*使用calc计算表单的宽度（其中40px是用来放icon的空间）*/
	  padding-left:40px;
	  border-radius:2px;
	  border:1px solid;
	  border-color:rgb(229,229,232) rgb(220,220,221) rgb(213,213,213) rgb(220,220,221);
	  display:block;
	  transition: all 300ms linear;
	}
	/*使用伪类制作三角效果*/
	.login-form .icon:before, .login-form .icon:after {
	  content:"";
	  position:absolute;
	  top:10px;
	  left:30px;
	  width:0;
	  height:0;
	  border:4px solid transparent;
	  border-left-color:rgb(213,213,213);
	}
	/*表单焦点状态下效果*/
	.login-form .username input:focus, .login-form .password input:focus {
	  border-color:rgb(69,153,228);
	  box-shadow:0 0 2px 1px rgb(200,223,244);
	}
	/*这个是文本框选中时用户、密码图标颜色变化*/
	.login-form .username input:focus + span, .login-form .password input:focus + span {
	  background:-*-linear-gradient(top,rgb(255,255,255),rgb(245,245,245));
	  color:rgb(51,51,51);
	}
	/*这个是文本框选中时右向三角的颜色变化*/
	.login-form .username input:focus + span:after, .login-form .password input:focus + span:after {
	  border-left-color:rgb(0,0,0);
	}
	
	.login-form .account-control label {
	  margin-left:24px;
	  font-size:12px;
	  font-family: Arial, Helvetica, sans-serif;
	  cursor:pointer;
	}
	/*按钮效果*/
	.login-form button[type="submit"] {
	  color:#fff;
	  font-weight:bold;
	  float:right;
	  width:68px;
	  height:30px;
	  position:relative;
	  background:-*-linear-gradient(top,rgb(74,162,241),rgb(52,119,182)) 1px 0 no-repeat,
	       -*-linear-gradient(top,rgb(52,118,181),rgb(36,90,141)) left top no-repeat;
	  background-size:66px 28px,68px 29px;
	  border:none;
	  border-top:1px solid rgb(52,118,181);
	  border-radius:2px;
	  box-shadow:inset 0 1px 0 rgb(86,174,251);
	  text-shadow:0 1px 1px rgb(51,113,173);
	  transition: all 200ms linear;
	}
	.login-form button[type="submit"]:hover {
	  text-shadow:0 0 2px rgb(255,255,255);
	  box-shadow:inset 0 1px 0 rgb(86,174,251),0 0 10px 3px rgba(74,162,241,0.5);
	}
	.login-form button[type="submit"]:active {
	  background:-*-linear-gradient(top,rgb(52,119,182),rgb(74,162,241)) 1px 0 no-repeat,
	       -*-linear-gradient(top,rgb(52,118,181),rgb(36,90,141)) left top no-repeat;
	}
	/*自定义复选框效果，将复选框隐藏。将自定义的复选框显示出来替代默认复选框*/
	.login-form .account-control input {
	  width:0px;
	  height:0px;
	}
	/*自定义复选框未选中状态样式，这里是2层背景色拼装成的checkbox样式*/
	.login-form label.check {
	  position:absolute;
	  left:0;
	  top:50%;
	  margin:-8px 0;
	  display:inline-block;
	  width:16px;
	  height:16px;
	  line-height: 16px;
	  text-align:center;
	  border-radius:2px;
	  background:-*-linear-gradient(top,rgb(255,255,255),rgb(246,246,246)) 1px 1px no-repeat,
	       -*-linear-gradient(top,rgb(227,227,230),rgb(165,165,165)) left top no-repeat;
	  background-size:14px 14px,16px 16px;
	}
	/*自定义复选框选中状态样式*/
	.login-form .account-control input:checked + label.check:before {
	  content:attr(data-on);
	  font-family:loginform-icon;
	}
</style>

<!--http://www.w3cplus.com/demo/css3/minimal-login-ui/profilepicture.jpg-->
<title>login</title>

</head>

<body>
	<header>该例子学习自W3CPlus网站的CSS3制作登录表单</br>  http://www.w3cplus.com/demo/mini-login-form.html</header>
<section class="demo">
  <div class="content">
    <form action="" method="post" class="login-form">
      <div class="username">
        <input type="text" name="username" placeholder="emma.watson@gmail.com" autocomplete="on" />
        <span class="user-icon icon">u</span> </div>
      <div class="password">
        <input type="password" name="password" placeholder="*******" />
        <span class="password-icon icon">p</span> </div>
      <div class="account-control">
        <input type="checkbox" name="Remember me" id="Remember me" value="Remember me" checked="checked" />
        <label for="Remember me" data-on="c" class="check"></label>
        <label for="Remember me" class="info">Remember me</label>
        <button type="submit">Login</button>
      </div>
      <p class="not-registered">Not a registered user yet?<a>Sign up now!</a></p>
    </form>
  </div>
</section>
</body>
</html>